"""
定位推荐人并点击
"""

from selenium.webdriver.common.by import By

elemnets = '//*[@id="wrap"]/div[1]/div[1]/dl[2]/dt/a'


def to_recommend(browser):
    try:
        """点击推荐人"""
        recommend_element = browser.find_element(By.XPATH, elemnets)
        recommend_element.click()

    except Exception as e:
        print(e)
        return False
